package com.wanmait.employment.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.wanmait.employment.entity.ExpectedSalary;
import com.wanmait.employment.mapper.ExpectedSalaryMapper;
import com.wanmait.employment.service.ExpectedSalaryService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Create By pc on 2023/5/24.
 * 期望薪资
 */
@Service
public class ExpectedSalaryServiceImpl implements ExpectedSalaryService {
    @Resource
    private ExpectedSalaryMapper expectedSalaryMapper;
    @Override
    public List<ExpectedSalary> selectList(String title) {
        QueryWrapper<ExpectedSalary> queryWrapper = new QueryWrapper<>();
        queryWrapper.like("title",title);
        return  expectedSalaryMapper.selectList(queryWrapper);
    }

    @Override
    public Integer update(ExpectedSalary expectedSalary) {
        return expectedSalaryMapper.updateById(expectedSalary);
    }

    @Override
    public Integer insert(ExpectedSalary expectedSalary) {
        return expectedSalaryMapper.insert(expectedSalary);
    }

    @Override
    public void delete(Integer id) {
       expectedSalaryMapper.deleteById(id);
    }

}
